home *** CD-ROM | disk | FTP | other *** search
- function init()
- {
- _visible = true;
- text_mc._visible = false;
- build();
- }
- function build()
- {
- SCROLLBOX_INIT_POS = 58;
- TEXT_POS = 2;
- CONTENT_POS = 0;
- var _loc2_ = Tardis.ActiveSection.id;
- var _loc1_ = Tardis.Colors;
- strSECTION_COLOR = _loc1_.getString(_loc2_);
- SECTION_COLOR = _loc1_.getHex(_loc2_);
- strSECTION_COLOR50 = _loc1_.getString(_loc2_ + "50");
- SECTION_COLOR50 = _loc1_.getHex(_loc2_ + "50");
- DEFAULT_COLOR = _loc1_.getHex("default");
- DEFAULT_COLOR50 = _loc1_.getString("default50");
- if(nodeData.byName("title").getText() != null || nodeData.byName("title2").getText() != null || nodeData.byName("title3").getText() != null)
- {
- var _loc3_ = "<FONT COLOR=\"" + strSECTION_COLOR + "\">" + nodeData.byName("title").getText() + " </FONT>";
- _loc3_ += "<FONT COLOR=\"" + strSECTION_COLOR50 + "\"> " + nodeData.byName("title2").getText() + " </FONT>";
- _loc3_ += "<FONT COLOR=\"" + DEFAULT_COLOR50 + "\"> " + nodeData.byName("title3").getText() + " </FONT>";
- titleFF.htmlText = _loc3_;
- titleFF._y = TEXT_POS;
- titleFF.resize();
- TEXT_POS += Math.ceil(titleFF._height - 3);
- }
- this.attachMovie("scrollContentMC","sMC",Tardis.depth++);
- var ndBody = nodeData.byName("body");
- if(ndBody.getText() != null)
- {
- sMC.bodyFF.htmlText = parseBoldTags(ndBody.getText());
- sMC.bodyFF.textColor = DEFAULT_COLOR;
- sMC.bodyFF.autoSize = true;
- sMC.bodyFF._y = CONTENT_POS;
- CONTENT_POS += sMC.bodyFF._height;
- }
- sMC.termsTitleFF.htmlText = "Terms and conditions";
- sMC.termsTitleFF.textColor = SECTION_COLOR;
- sMC.termsTitleFF._x = 0;
- sMC.termsTitleFF._y = CONTENT_POS;
- CONTENT_POS += sMC.termsTitleFF._height;
- var ndtc = nodeData.byName("tc");
- if(ndtc.getText() != null)
- {
- sMC.tcFF.htmlText = parseBoldTags(ndtc.getText());
- sMC.tcFF.textColor = DEFAULT_COLOR;
- sMC.tcFF.autoSize = true;
- sMC.tcFF._y = CONTENT_POS;
- }
- if(sMC._height > 280)
- {
- this.attachMovie("FScrollPaneSymbol","contentScroll",Tardis.depth++);
- attachMovie("MaskerMC","MaskerMC",Tardis.depth++);
- contentScroll._x = 6;
- contentScroll._y = TEXT_POS;
- contentScroll.setSize(358,280);
- contentScroll.setHScroll(false);
- contentScroll.setScrollContent(sMC);
- MaskerMC._x = 6;
- MaskerMC._y = TEXT_POS - MaskerMC._height + 4;
- MaskerMC._width = contentScroll._width - 17;
- MaskerMC._height = 5;
- TEXT_POS += contentScroll._height + 5;
- }
- else
- {
- sMC._x = 8;
- sMC._y = TEXT_POS;
- TEXT_POS = modHeight - bodyLinkMC._height + 14;
- }
- play();
- }
- function downloadFolder(f, OS)
- {
- var _loc2_ = Tardis.ASSETS_FOLDER.indexOf("html");
- var _loc1_ = Tardis.ASSETS_FOLDER.substring(_loc2_,Tardis.ASSETS_FOLDER.length) + "downloads/" + f;
- getURL("Lingo:Flsh_downloadFolder(\"" + _loc1_ + "\"," + OS + ",\"" + this + "\")","");
- }
- function downloadError(strMsg)
- {
- showError(strMsg);
- }
- function showError(strError)
- {
- with(feedback_txt)
- {
- multiline = true;
- wordWrap = true;
- autoSize = "left";
- text = strError;
- }
- }
- function showTerms()
- {
- terms_mc._visible = true;
- }
- function hideTerms()
- {
- terms_mc._visible = false;
- }
- function parseBoldTags(str)
- {
- var _loc1_ = str;
- var _loc2_ = _loc1_.indexOf("<b>");
- if(_loc2_ != -1)
- {
- var _loc3_ = _loc1_.indexOf("</b>");
- var word = _loc1_.substring(_loc2_ + 3,_loc3_);
- var beginning = _loc1_.substring(0,_loc2_);
- var end = _loc1_.substring(_loc3_ + 4);
- return beginning + "<font face=\'TardisBold\'>" + word + "</font>" + parseBoldTags(end);
- }
- return _loc1_;
- }
- function termsSetup()
- {
- myCol = new Color("terms_mc.back_btn");
- myCol.setRGB(SECTION_COLOR);
- terms_mc.attachMovie("text_mc","text_mc",Tardis.depth++);
- terms_mc.text_mc.body_FF.htmlText = parseBoldTags(nodeData.byName("tc").getText());
- terms_mc.attachMovie("FScrollPaneSymbol","contentScroll",Tardis.depth++);
- terms_mc.contentScroll._x = 10;
- terms_mc.contentScroll._y = 37;
- terms_mc.contentScroll.setSize(345,300);
- terms_mc.contentScroll.setHScroll(false);
- terms_mc.contentScroll.setScrollContent(text_mc);
- terms_mc.swapDepths(Tardis.depth++);
- terms_mc._visible = false;
- }
- _visible = false;
- stop();
- onReady();
- download_btn.onRollOver = function()
- {
- myCol = new Color(this);
- myCol.setRGB(SECTION_COLOR);
- };
- download_btn.onRollOut = function()
- {
- myCol = new Color(this);
- myCol.setRGB(SECTION_COLOR50);
- };
- download_btn.onRelease = function()
- {
- if(this._parent.termsCheckBox.termsAgreed)
- {
- showError("");
- downloadFolder(nodeData.byName("file").getText(),1);
- }
- else
- {
- showError("You must read and agree to the terms and conditions before you download the game demo.");
- }
- };
- init();
- onComplete();
- stop();
-